FILE(GLOB EXAMPLES *.sg)
FOREACH(EXAMPLE ${EXAMPLES})
	get_filename_component(EXAMPLE_NAME ${EXAMPLE} NAME_WE)

	add_test(NAME cmdline-${EXAMPLE_NAME}
			WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
			COMMAND ${CMDLINE_STATIC_EXEC} ${EXAMPLE})
ENDFOREACH()

INSTALL(FILES ${EXAMPLES}
	DESTINATION share/shogun/examples/cmdline
	COMPONENT cmdline-examples)
